﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;

namespace DAL.BusinessDeal
{
    public class DtContainerSizesDAL
    {
        public const string ST_CONTAINER_SIZES = 
       @"select CSZ_CSIZECD,CSZ_CSIZENM,CSZ_BELONGSIZE from st_container_sizes";


        /// <summary>
        /// 获取船期
        /// </summary>
        /// <returns></returns>
        public DataTable GetTable()
        {
            return GetDataTable(ST_CONTAINER_SIZES);
        }


        public DataTable GetDataTable(string sql)
        {
            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(sql);
            DataTable dt = db.ExecuteDataTable(dbCommand);
            if (dt != null)
            {
                dt.TableName = "st_container_sizes";
            }
            return dt;
        }
    }
}
